package com.lzm.ydpt.entity;

/**
 * 小费
 */
public class GratuityBean {
    private String gratuity_name;
    private float gratuity;
    private boolean isSelect;


    /**
     * 重写hashCode，方便集合的操作
     */
    @Override
    public int hashCode() {
        return (int) (this.gratuity + this.gratuity);
    }

    /**
     * 重写equals，只要tagid相同就默认是通对象，才认为这个对象是想等的
     */
    @Override
    public boolean equals(Object obj) {
        if (!(obj instanceof GratuityBean)) {
            return false;
        }
        GratuityBean tempBean = (GratuityBean) obj;
        return (this.gratuity == tempBean.gratuity);
    }

    public GratuityBean(String gratuity_name, float gratuity, boolean isSelect) {
        this.gratuity_name = gratuity_name;
        this.gratuity = gratuity;
        this.isSelect = isSelect;
    }

    public String getGratuity_name() {
        return gratuity_name;
    }

    public void setGratuity_name(String gratuity_name) {
        this.gratuity_name = gratuity_name;
    }

    public float getGratuity() {
        return gratuity;
    }

    public void setGratuity(float gratuity) {
        this.gratuity = gratuity;
    }

    public boolean isSelect() {
        return isSelect;
    }

    public void setSelect(boolean select) {
        isSelect = select;
    }
}
